# Importing the libraries
import numpy as np
import pandas as pd
import datetime
import seaborn as sns
import matplotlib.pyplot as plt
df = pd.read_csv("/home/z/Downloads/EduSurvey032920.csv", names=["Security Role",
"Highest Formal Ed",
"Multiple Degrees",
"Degree Earned",
"Related Degree",
"Degree Fields",
"Degree Origin",
"Degree Gatekeeping",
"Degrees Required",
"Certifications",
"Certifications (Non Security)",
"Self Training Method",
"Age Range",
"Gender Identity",
"Race and Ethnic Identity",
"Years in Security",
"Years in Tech",
"Country of Origin",
"Country of Residence"])
df=df.drop(df.index[0])
df.describe()
plt.figure(figsize=(10,4))
plot = sns.countplot(x="Security Role",data=df, palette="coolwarm")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,10))
plot = sns.countplot(x="Highest Formal Ed",data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
plot = sns.countplot(x="Multiple Degrees",data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
plot = sns.countplot(x="Degree Earned",data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.figure(figsize=(10,4))
title = "Related Degree"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
# View image separately
plt.figure(figsize=(100,100))
title = "Degree Fields"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Degree Origin"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Degree Gatekeeping"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Degrees Required"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(100,100))
title = "Certifications"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(100,100))
title = "Certifications (Non Security)"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(100,100))
title = "Self Training Method"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Age Range"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Gender Identity"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,10))
title = "Race and Ethnic Identity"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Years in Security"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Years in Tech"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Country of Origin"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()
plt.figure(figsize=(10,4))
title = "Country of Residence"
plot = sns.countplot(x=title,data=df, palette="colorblind")
plot.set_xticklabels(plot.get_xticklabels(), rotation=40, ha="right")
plt.tight_layout()
plt.show()